package com.example.shopping2.timmer

class TimmerThread : Thread {
    private lateinit var handler: TimmerHandler

    constructor(handler: TimmerHandler) : super() {
        this.handler = handler
    }

    override fun run() {
        super.run()
        for (i in 1 downTo 1) {
            sleep(1000)
            var obtainMessage = handler.obtainMessage()
            obtainMessage.obj = i
            handler.sendMessage(obtainMessage)
        }
    }
}